// 第一步下包
// npm i vue-router@3.5.3

import Vue from "vue";
// 第二部引入router
import VueRouter from "vue-router"

// 第三步引入复用组件
import DiscoveringMusic from "../views/DiscoveringMusic.vue"
import MyMusicCopy  from "../views/MyMusicCopy.vue"
import MyFriend from "../views/MyFriend.vue"
import MyHomePages from "../views/MyHomePages.vue"

// 使用
Vue.use(VueRouter)
const router = new VueRouter({
    routes:[
        {
            path:'/',
            redirect:'/home'
        },
        {
            path:'/music',
            component:DiscoveringMusic
        },        {
            path:'/mumusic',
            component:MyMusicCopy
        },        {
            path:'/friend',
            component:MyFriend
        },        {
            path:'/home',
            component:MyHomePages
        },
    ]
})

export default router